import React,{ Component }from 'react'
import {Route,Switch,withRouter,Redirect} from 'react-router-dom'
import Main from './Main'
import ListById from './ListById'
import Detail from './Detail'

import './App.css'

 class App extends Component {
  
  render() {
    return (
      <div>
        {/* <div className='router-link' style={{display:"none"}}>
          <Link className="link-main" to='/main'>Main</Link>
          <Link className="link-List" to="/list">Main</Link>
          <Link className="link-detail" to="/detail">Home</Link>
        </div> */}
        <div className='link'>
          <Switch>
            <Route path="/main" component={Main}/>
            <Route path="/list/:id" component={ListById}/>
            <Route path="/detail/:id" component={Detail}/>
            <Redirect to='/main'></Redirect>
          </Switch>
        </div>
      </div>
    )
  }
}

export default App